package com.shy;

/**
 * Created by huangyang on 2017/2/6.
 */
public class BusinessDelegatePatternDemo {
    public static void main(String[] args) {
        BusinessDelegate businessDelegate = new BusinessDelegate();
        businessDelegate.setServiceType("EJB");

        Student student = new Student(businessDelegate);
        student.doTask();

        businessDelegate.setServiceType("JMS");
        student.doTask();
    }
}
